package abq2.jic.jic.plugin.operate.fastShowAI;

import kd.bos.form.events.BeforeDoOperationEventArgs;
        import kd.bos.form.operate.FormOperate;
        import kd.bos.report.plugin.AbstractReportFormPlugin;
        import kd.bos.servicehelper.DispatchServiceHelper;
        import kd.sdk.plugin.Plugin;

        import java.util.EventObject;
        import java.util.HashMap;

/**
 * 单据界面插件
 */
public class BooksFastAI extends AbstractReportFormPlugin implements Plugin {
    @Override
    public void beforeDoOperation(BeforeDoOperationEventArgs e) {
        super.beforeDoOperation(e);
        String operateKey = ((FormOperate) e.getSource()).getOperateKey();
        if (operateKey.equals("showai")){
            String pageId = this.getView().getMainView().getPageId();
            Object pkValue = Long.parseLong("1987968519534280704");
            DispatchServiceHelper.invokeBizService("ai", "gai", "GaiService","selectProcessInSideBar",pkValue,pageId,"请输入您的书籍偏好，我会为您推荐相应的书籍");
        } else if (operateKey.equals("showai2")) {
            String pageId = this.getView().getMainView().getPageId();
            Object pkValue = Long.parseLong("1950982037158505472");
            DispatchServiceHelper.invokeBizService("ai", "gai", "GaiService","selectProcessInSideBar",pkValue,pageId,"请输入您要了解的书籍的信息");
        }
    }
}